NoSQL operator: seektable
Extract rows beginning at selected offsets from a NoSQL table.
Usage: seektable [options] table < offset_list
Options:
--help (-h)
Print this help info.
--input (-i) 'file'
Read input offsets from 'file' instead of STDIN.
--output (-o) 'file'
Write output to 'file' instead of STDOUT.
--verbose (-v)
Report bad offsets to STDERR.
--no-header (-N)
Do not print the table header on STDOUT.
Notes:
This operator takes a list of byte-offsets on STDIN and prints on STDOUT
the corresponding table records from the table specified as a command
line argument. The list of offsets can be built with the 'indextable -N'
operator, and 'seektable' expects it to be a one-column, header-less
table, like this:
228
1117
518
1225
Any blanks preceding and following each byte-offset are silently
ignored. Input offset values that do not point at the beginning of a row
in 'table' are also ignored, unless '-v' was specified, in which case
they are still ignored, but a bit more loudly.
Anything that comes before the last valid offset preceding the newline
of each input row is silently dropped.
Examples :
seektable table < offset_table
or
printf '228\n 1117\n 518 \n 1225 \n' | seektable table
Note the randomly spaced offset values in the second example.
cat<